AnimationWindow Class Reference

#include <AnimationWindow.h>

List of all members.

Public Member Functions

 AnimationWindow ()
void processInput (double delta, osg::ref_ptr< PhysicsEventHandler > ph)
void setCamera ()
void setViewer ()
void setScene ()
osg::ref_ptr< osg::Group > getRoot ()
osg::ref_ptr< osgProducer::Viewer > getViewer ()
void createCarPhysics (Vehicle &vehicle, osg::ref_ptr< osg::PositionAttitudeTransform > transform)
void realize ()
void addOtherPhysicalObject (TraffEduObject *object)
void createConstantObjects (OSGWindows *osgWindows)
void odeDraw ()
void exit (OSGWindows *)
vector< CarPhysics * > getpCarPhys ()
vector< OtherPhysicalObjects * > getOtherPhysicalObjects ()
void followVehicle (OSGWindows *osgwindows)
void setRotationArray (Vehicle *)
void loadSkyBox (OSGWindows *osgwindows)
void draw ()
void generateSeq (OSGWindows *window, TrafficLight *ptr)
void deselectAll (OSGWindows *osgwind)

Public Attributes

double physTime
double deltaTime
double throttle
double brake
double steering
Audio * audio_

Private Member Functions

void createControlPoints (Vehicle *vehicle)
void createRotationArray (Vehicle *vehicle)

Private Attributes

vector< CarPhysics * > pCarPhysVector
vector< OtherPhysicalObjects * > otherPhysicalObjects
osg::Matrixd myCameraMatrix
osg::Matrixd cameraRotation
osg::Matrixd cameraTrans
osg::ref_ptr< osg::Group > root
osg::ref_ptr< osgProducer::Viewer > viewer


Detailed Description

AnimationWindow Class When animation button is clicked, an instance of this class is created animation window initializations and calculations are done through this class


Constructor & Destructor Documentation

AnimationWindow::AnimationWindow (   ) 
 

A constructor. initializes sound parameters and scene root


Member Function Documentation

void AnimationWindow::addOtherPhysicalObject (  TraffEduObject *  object  ) 
 

a normal member taking one argument

Parameters:
object pointer to TraffEduObject creates physical object for a given object

void AnimationWindow::createCarPhysics (  Vehicle &  vehicle,
osg::ref_ptr< osg::PositionAttitudeTransform >  transform
) 
 

a normal member taking two arguments

Parameters:
vehicle reference
transform osg::ref_ptr<osg::PositionAttitudeTransform> creates physical car for vehicle object

void AnimationWindow::createConstantObjects (  OSGWindows *  osgWindows  ) 
 

a normal member taking one argument

Parameters:
osgWindows pointer to OSGWindows creates physical objects for all objects

void AnimationWindow::createControlPoints (  Vehicle *  vehicle  )  [private]
 

a normal member taking one argument

Parameters:
vehicle pointer to Vehicle create control points for creating the path of the vehicle in animaton

void AnimationWindow::createRotationArray (  Vehicle *  vehicle  )  [private]
 

a normal member taking one argument

Parameters:
vehicle pointer to Vehicle calculate rotations of the vehicle in animaton

void AnimationWindow::deselectAll (  OSGWindows *  osgwind  ) 
 

void AnimationWindow::draw (   ) 
 

a normal member the animation window's main drawing loop is implemented in this function also the PhysicsServer is stepped.

void AnimationWindow::exit (  OSGWindows *   ) 
 

void AnimationWindow::followVehicle (  OSGWindows *  osgwindows  ) 
 

a normal member taking one argument

Parameters:
osgwindows pointer to OSGWindows set camera follow a vehicle path

void AnimationWindow::generateSeq (  OSGWindows *  window,
TrafficLight *  ptr
) 
 

the traffic lights timing's is implemented in this function.

Parameters:
window is needed to reach to frames vector
ptr is the pointer to the traffic light object that the timing will be set up for.

vector<OtherPhysicalObjects *> AnimationWindow::getOtherPhysicalObjects (   ) 
 

vector<CarPhysics *> AnimationWindow::getpCarPhys (   ) 
 

osg::ref_ptr<osg::Group> AnimationWindow::getRoot (   ) 
 

a normal member

Returns:
osg::ref_ptr<osg::Group> returns pointer to the root of the scene

osg::ref_ptr<osgProducer::Viewer> AnimationWindow::getViewer (   ) 
 

a normal member

Returns:
osg::ref_ptr<osgProducer::Viewer> returns pointer to the viewer

void AnimationWindow::loadSkyBox (  OSGWindows *  osgwindows  ) 
 

a normal member taking one argument adds skybox node to root

Parameters:
osgwindows 

void AnimationWindow::odeDraw (   ) 
 

a normal member calls carPhysics odeDraw function for all physical car objects

void AnimationWindow::processInput (  double  delta,
osg::ref_ptr< PhysicsEventHandler >  ph
) 
 

a normal member taking two arguments and returning void.

Parameters:
delta a double argument.
ph an osg::ref_ptr. sets car acceleration and steering using input handling results

void AnimationWindow::realize (   ) 
 

void AnimationWindow::setCamera (   ) 
 

a normal member sets camera position

void AnimationWindow::setRotationArray (  Vehicle *   ) 
 

void AnimationWindow::setScene (   ) 
 

a normal member binds the root and the viewer

void AnimationWindow::setViewer (   ) 
 

a normal member sets up osgProducer::Viewer


Member Data Documentation

Audio* AnimationWindow::audio_
 

double AnimationWindow::brake
 

osg::Matrixd AnimationWindow::cameraRotation [private]
 

osg::Matrixd AnimationWindow::cameraTrans [private]
 

double AnimationWindow::deltaTime
 

osg::Matrixd AnimationWindow::myCameraMatrix [private]
 

vector<OtherPhysicalObjects *> AnimationWindow::otherPhysicalObjects [private]
 

vector<CarPhysics *> AnimationWindow::pCarPhysVector [private]
 

a private variable vector of physical cars

double AnimationWindow::physTime
 

osg::ref_ptr<osg::Group> AnimationWindow::root [private]
 

a private variable scene root

double AnimationWindow::steering
 

a public variable. when a car is set user controlled, steering is set to define car turn angle when user presses a or d key

double AnimationWindow::throttle
 

a public variable. when a car is set user controlled, throttle is set to define car acceleration when user presses w key

osg::ref_ptr<osgProducer::Viewer> AnimationWindow::viewer [private]
 

a private variable viewer


The documentation for this class was generated from the following file:
Generated on Sun May 28 18:43:59 2006 by  doxygen 1.4.6-NO